<template>
  <div class="buttonBottom" @click.stop="clickBtn">
    <div
      class="button_btn"
      :style="{ background: buttonData.background || '#3975F6', color: buttonData.color || '#fff' }"
    >
      {{ buttonData.name }}
    </div>
    <div class="ios-padding-bottom" v-if="showIosBottom"></div>
  </div>
</template>

<script setup lang="ts">
import { ref } from "vue";
const prop = defineProps({
  buttonData: {
    type: Object as any,
    default: {
      name: "确定",
      background: "#3975F6",
      color: "#fff",
    },
  },
  showIosBottom: {
    type: Boolean,
    default: true,
  },
});
const emit = defineEmits(["clickBtn"]);
const clickBtn = () => {
  emit("clickBtn");
};
</script>

<style lang="less" scoped>
.buttonBottom {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  padding: 20rpx 50rpx;
  text-align: center;
  font-size: 34rpx;
  background-color: #fff;
  z-index: 99;
  .button_btn {
    width: 100%;
    padding: 30rpx 0;
    border-radius: 24rpx;
  }
}
</style>
